package com.galen.remember;

import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.web.authentication.rememberme.PersistentTokenBasedRememberMeServices;
import org.springframework.security.web.authentication.rememberme.PersistentTokenRepository;

import javax.servlet.http.HttpServletRequest;

/**
 * 记住我自定义实现
 *
 * @author GalenGao
 * @version Id: RememberMeConfig.java, v 0.1 2022/6/30 12:15 GalenGao Exp $$
 */
public class MyRememberMe extends PersistentTokenBasedRememberMeServices {


    public MyRememberMe(String key, UserDetailsService userDetailsService, PersistentTokenRepository tokenRepository) {
        super(key, userDetailsService, tokenRepository);
    }


    @Override
    protected boolean rememberMeRequested(HttpServletRequest request, String parameter) {
        return super.rememberMeRequested(request, "rememberMe");
    }
}
